<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>thymeleaf demo</title>
</head>
<body>
<span th:text="${book.author.name}">default content</span>

<hr/>
<li th:each="book : ${books}">default content - 因为没有指定th:text!!!</li>

<hr/>
<li th:each="book : ${books}" th:text="*{book.name}">default content</li>

<hr/>
<li th:each="book : ${books}" th:text="${book.name}">default content</li>

<hr/>
<!-- th:attr这种形式不是H5标准的attr，所以，thymeleaf还提供了data-th-attr的形式！这才是完全H5的attr！-->
<label th:value="${book.author.name}">默认的label值</label> <br/>
<label data-th-value="${book.author.name}">默认的label值</label> <br/>

<hr/>
<input type="text" th:value="${book.author.name}" value="default value"> <br/>
<input type="text" data-th-value="${book.author.name}" value="default value"> <br/>

<hr/>
${#ctx} <br/>
<input type="text" data-th-value="${#ctx}" value="default value"> <br/>
${#vars} <br/>
<input type="text" data-th-value="${#vars}" value="default value"> <br/>
${#locale} <br/>
<input type="text" data-th-value="${#locale}" value="default value"> <br/>
${#request} <br/>
<input type="text" data-th-value="${#request}" value="default value"> <br/>
${#response} <br/>
<input type="text" data-th-value="${#response}" value="default value"> <br/>
${#session} <br/>
<input type="text" data-th-value="${#session}" value="default value"> <br/>
${#servletContext} <br/>
<input type="text" data-th-value="${#servletContext}" value="default value"> <br/>


<hr>
#{jdbc.username} <br>
#{jdbc.password} <br>
<p th:utext="#{jdbc.username}">#{jdbc.username}!</p>
<p th:utext="#{jdbc.password}">#{jdbc.password}!</p>
</body>
</html>